<?php

class FriendGetInviteCountRewardAction extends SzAbstractAction
{
    Protected $paramTypes = array(
        SzAbstractAction::TYPE_INT,
        SzAbstractAction::TYPE_INT,
        SzAbstractAction::TYPE_INT,
    );

    /**
     * 获取邀请个数阶段奖
     *
     * @param int $userId
     * @param int $count
     * @param int $reqTime
     * @return SzResponse
     */
    public function execute($userId, $count, $reqTime)
    {
        if (!GameService::get()->verifySysUnlock($userId, GameConst::FUNC_FRIEND_FUNC)) {
            return $this->buildResponse(false);
        }

        return $this->buildResponse(
            FriendService::get()->getInviteFriendCountReward($userId, $count)
        );
    }
}